import React, { Component } from 'react'
import { getcommlist, getMsg, getuserinfo_name_pic } from '../../redux/actionCreator'
import { withRouter } from "react-router-dom"
import { connect } from 'react-redux'
import { imgInter, imgInter2 } from '../../data/Interface'
// import pxPage from '../../root/pxPage'
import './dynaic.css'
const img = {
    width: '100%',
    // height:'100%',
    margin:'auto',
    textAlign:'center'
}
export class Imageshow extends Component {
    constructor(props) {
        super(props);
        this.state = {
            url: JSON.parse(localStorage.getItem('imgdata'))
        }
        // this.props.dispatch(getcommlist(this.state.info.commodity_id))
    }

    render() {
        const { url } = this.state
        console.log(url)
        return (
            <div className='image-show' style={{ backgroundColor: 'black', width: '100vh', height: '100vh', textAlign: 'center' }}>
                <i className='iconfont icon-fanhui' style={{fontSize:'2em',position:'absolute',top:'1em',left:'1em'}}
                    onClick={
                        ()=>{
                            this.props.history.goBack()
                        }
                    }
                ></i>
                <div style={{margin:'0 auto',width:'100%'}}>
                <img src={imgInter2 + url} style={img}></img>
                </div>
              
            </div>
        )
    }
}
const mapStateToProps = (state) => ({
    // login: state.login,
    // // shop: state.shop,
    // business: state.business,
    // comm: state.comm
})
export default withRouter(Imageshow)